package kassiopeia.gui

import grails.converters.JSON;

class MonitoringController {

    def agentService

    def index = {
        [ pings : agentService.getAllPings() ]
    }

    def refresh = {
        render agentService.getAllPings() as JSON
    }

    def renderAgentInfo = {
        def ping = agentService.getPing(params.agentId)
        if(ping != null) {
            render(template:"agentTemplate", model:[ping:ping])
        }
    }
}
